<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDomainsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('domains', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();


			//varchar 255 领域分类名称，可以为顶级分类，也可以为子分类
			$table->string('cate_name');
			//int 11 如果为顶级分类，则为0，如果为子分类，则为顶级分类的id
			$table->integer('parent_id');

			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('domains');
	}

}
